/**
 * 
 */
(function ($) {
	 var methods ={
			showLcol :function(){
				var html = '<div class="left-ul">'
									+'<ul>'
										+'<a href="../backstage_control/target_control.jsp">'+'<li>'+"应用管理"+'</li>'+'</a>'
										+'<a href="#" id="target_control" >'+'<li>'+"目标管理"+'</li>'+'</a>'
										+'<ul class="the_second_ul"><a href="../backstage_control/target_control.jsp">'+'<li>'+" >>目标库管理"+'</li>'+'</a>'
										+'<a href="../backstage_control/target_control.jsp">'+'<li ">'+" >>目标审核"+'</li>'+'</a>'
										+'<a href="../backstage_control/target_control.jsp">'+'<li>'+" >>新增目标"+'</li>'+'</a></ul>'
										+'<a href="#" id="square_control" >'+'<li>'+"广场管理"+'</li>'+'</a>'
										+'<ul class="the_second_ul"><a href="../backstage_control/target_control.jsp">'+'<li>'+" >>广场内容管理"+'</li>'+'</a>'
										+'<a href="../backstage_control/target_control.jsp">'+'<li ">'+" >>举报内容管理"+'</li>'+'</a>'
										+'<a href="../backstage_control/target_control.jsp">'+'<li>'+" >>目标广场"+'</li>'+'</a></ul>'
										+'<a href="../backstage_control/target_control.jsp">'+'<li>'+"消息管理"+'</li>'+'</a>'
										+'<a href="../backstage_control/target_control.jsp">'+'<li>'+"积分规则和说明"+'</li>'+'</a>'
									+'</ul>'
								+'</div>';
				
		var dom=$("div.col-2").append(html);
			}
		};
	        var value=$('input#the_goal').attr('value');
			methods.showLcol();
			 if(value=='目标库管理'||value=='目标审核'||value=='新增目标'||value=='广场内容管理'||value=='举报内容管理'||value=='目标广场')
				 $('li:contains("'+value+'")').addClass('selected').parents('ul.the_second_ul').show();
			 else
			    $('li:contains("'+value+'")').addClass('selected');
			 $('div.left-ul a#target_control,div.left-ul a#square_control').click(function(){
				 $('div.left-ul li').removeClass('selected');
				 $(this).find('li').addClass('selected')
				 $(this).next().toggle('fast');
				 return false;
			 });
			 $('div.left-ul a').click(function(event){
				 event.stopPropagation();
			 });

	
})(jQuery);